import apibase from "@/api/apiBase";
import axios from "axios";
import { uploadImgInterface } from "./common.interface";

//省市区
export const $getAreaList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/api/common/getAreaList',
    data: params,
    instance,
  });
}
// 上传文件
export const $commonUploadImg = (params: uploadImgInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/api/common/uploadImg',
    data: params,
    instance,
    type: "upload",
  });
}